<!-- 模型数据类型详情弹窗 -->
<template>
            <a-form
                    ref="form3"
                    class="ele-form-detail"
                    :model="modelDataTypeModalApp.modelDataType"
                    :label-col="{md: {span: 2}, sm: {span: 4}, xs: {span: 6}}"
                    :wrapper-col="{md: {span: 22}, sm: {span: 20}, xs: {span: 18}}">
                <a-descriptions :title="modelDataTypeModalApp.title" bordered>
                                    <a-descriptions-item label="标识">
                        {{ modelDataTypeModalApp.modelDataType.Eid }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建人">
                        {{ modelDataTypeModalApp.modelDataType.creatorName }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="名称">
                        {{ modelDataTypeModalApp.modelDataType.name }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="数据类型">
                        {{ modelDataTypeModalApp.modelDataType.dataType }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="Java类型">
                        {{ modelDataTypeModalApp.modelDataType.javaType }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="描述">
                        {{ modelDataTypeModalApp.modelDataType.descName }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="显示索引">
                        {{ modelDataTypeModalApp.modelDataType.displayIndex }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="状态">
                        {{ modelDataTypeModalApp.modelDataType.status }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建人ID">
                        {{ modelDataTypeModalApp.modelDataType.creatorId }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="备注">
                        {{ modelDataTypeModalApp.modelDataType.remark }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建时间">
                        {{ modelDataTypeModalApp.modelDataType.createDatetime }}
                    </a-descriptions-item>
                                </a-descriptions>
            </a-form>
</template>

<script>
    import {defineComponent, reactive, onMounted, inject} from "vue";
    import {useRoute} from "vue-router"
    import {ModelDataTypeService} from "@/views/lims/gen/modelDataType/modelDataTypeService";

    export default defineComponent({
        setup() {
            const route = useRoute();
            let routeId = route.params.id;
            let modelDataTypeListApp = inject('modelDataTypeListApp', reactive({}));
            const modelDataTypeModalApp = reactive({id: null, modelDataType: {}, display: false});

            onMounted(() => {
                    modelDataTypeModalApp.modelDataType = {};
                if (routeId) {
                        modelDataTypeModalApp.id = routeId;
                } else if (modelDataTypeListApp.viewModalShowing) {
                        modelDataTypeModalApp.id = modelDataTypeListApp.currentId;
                        modelDataTypeModalApp.display = true;
                }
                if (modelDataTypeModalApp.id) {
                    getInfo(modelDataTypeModalApp.id);
                }
            })

            const getInfo = (id) => {
                    ModelDataTypeService.findModelDataType(id).then((res) => {
                            modelDataTypeModalApp.modelDataType = res.data;
                            modelDataTypeModalApp.title = "查看 " + modelDataTypeModalApp.modelDataType.name;
                })
            }

            return {
                    modelDataTypeModalApp,
                routeId,
                getInfo,
            }
        }
    })
</script>

<style scoped>
</style>

